package com.niguang.work.api.enums;

import lombok.Getter;

@Getter
public enum FormFlagEnum {

    SAFE_DANGER(1, "安全隐患"),

    QUALITY_DANGER(2, "质量安全");

    private Integer index;

    private String desc;

    FormFlagEnum(Integer index, String desc) {
        this.index = index;
        this.desc = desc;
    }


    public static String getName(Integer index) {
        for (FormFlagEnum c : FormFlagEnum.values()) {
            if (c.index.equals(index)) {
                return c.desc;
            }
        }
        return "";
    }
}
